package com.zjcode.cdcer.controller;

import com.chinatechstar.component.commons.controller.BaseController;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.DetailedDataReportingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:SystemInitController
 * @功能：详细数据上报
 * @author：wlei
 * @日期：2022/7/9-02:00
 **/
@RestController
@Slf4j
@RequestMapping("/v1/detaileddatareporting/")
public class DetailedDataReportingController extends BaseController {

    @Autowired
    private DetailedDataReportingService detailedDataReportingService;

    /**
     * 返回详情数据上报的所有字段信息
     *
     * @return
     */
    @GetMapping("listAllTableColumn")
    public JsonObj listAllTableColumn() {
        PageData pageData = getPageData();
        JsonObj result = detailedDataReportingService.listAllTableColumn(pageData);
        return result;
    }

    /**
     * 返回详情数据正式库的所有字段信息
     *
     * @return
     */
    @GetMapping("listAllTableColumn4Office")
    public JsonObj listAllTableColumn4Office() {
        PageData pageData = getPageData();
        JsonObj result = detailedDataReportingService.listAllTableColumn4Office(pageData);
        return result;
    }
}
